ci: fix dependency clone auth header for GitHub's new long token format#183
Merged
Merged
Conversation
Root cause of the intermittent 'Failed sending HTTP request' errors
since 2026-07-18: GitHub is rolling out a new, ~390-char token format
(ghs_..._<JWT>, "ver":3). The clone loop builds the auth header via
'echo -n "x-access-token:${token}" | base64', and GNU base64 wraps
its output at 76 chars. With the new token format the header value
therefore contains embedded newlines, which libcurl rejects before
sending the request.
This explains all observed symptoms:
- intermittent (only jobs that received a new-format token failed)
- instant failure (~60ms, before any transfer)
- all in-job retries failed (same token within a job)
- only the dependency clone affected (actions/checkout encodes via
JS Buffer, which never wraps)
Reproduced locally: a wrapped base64 header makes git clone fail
immediately with a libcurl header error.
Use base64 -w0, matching downstream/action.yml which already does
this correctly.
Florian Ruppel (fruppel)
force-pushed
the
fix/dep-clone-base64-wrap
branch
from
July 20, 2026 11:46
3da3412 to
acf2bc5
Compare
Malte Janz (MalteJanz)
approved these changes
Jul 20, 2026
Nicolas Fortier (nfortier-shopware)
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The intermittent
Failed sending HTTP requesterrors since 2026-07-18 (#181, #182 context) are not a network/transport problem.GitHub is rolling out a new ~390-char token format (
ghs_<id>_<JWT>,"ver":3in the payload). The dependency clone loop builds its auth header with:... "AUTHORIZATION: basic $(echo -n "x-access-token:${dep_token}" | base64)"GNU
base64wraps output at 76 chars. Old tokens (x-access-token:+ ~40 chars = 55 chars) fit on one line; new-format tokens produce a multi-line header value, and libcurl rejects headers with embedded newlines — on the runner's curl version this surfaces asFailed sending HTTP request(curl error 55), before a single byte is transferred.actions/checkoutencodes via JSBuffer(never wraps);downstream/action.ymlalready usesbase64 -w0Reproduction
Fix
base64 -w0, exactly likedownstream/action.yml:81already does.Related findings (separate follow-ups needed)
shopware/Rufus.github/actions/setup-rufus/action.ymlhas the same unwrappedbase64for the masterchief-sdk header — same fix needed there.could not read Username: the workflow_dispatch payload carries a token from the original upstream run, which is revoked/expired by re-run time. Re-runs of downstream runs can never work this way.